<template>
  <el-card >
  <my-table path="banji/" :cols="cols" :formObj="form" :tableAttrs="tableAttrs" :rules="rules" :pageSize="pageSize" :pageParams="pageParams"  >
    <template v-slot:form>
      <el-form-item label="班级名" prop="name">
        <el-input v-model="form.name" placeholder="班级名" clearable></el-input>
      </el-form-item>
      <el-form-item label="老师" prop="manager" >
        <el-input v-model="form.manager" placeholder="老师" clearable></el-input>
      </el-form-item>
    </template>
  </my-table>
  </el-card>

</template>

<script>
  import myTable from '../../components/myTable.vue';
  export default {
    components:{
      myTable
    },
    data() {
      return {
        cols:[
          {
            property:'name',
            label:'班级名',
          },
          {
            property:'manager',
            label:'老师'
          }
        ],
        tableAttrs: {
          border: true
        },
       form: {
         name: '',
         manager: '',
       },
 //对话框
        rules: {
          name: [{
            required: true,
            message: '班级名必填',
            trigger: 'blur'
          }],
          manager: [{
            required: true,
            message: '老师必填',
            trigger: 'blur'
          }],
        },
        pageSize:[10,20,30,50],
        pageParams:{
          limit:10
        }
      }
    },
  }
</script>

<style>
</style>
